package mskim.study.ooad.ch01_06;

public class MandolinSpec extends InstrumentSpec {
	private Style style;

	public MandolinSpec(Builder builder, String model, Type type, Wood backWood,
			Wood topWood, Style style) {
		super(builder, model, type, backWood, topWood);
		this.style = style;
	}

	public Style getStyle() {
		return style;
	}

	@Override
	public boolean matchs(InstrumentSpec otherSpec) {
		if (! super.matchs(otherSpec)) return false;
		if (!(otherSpec instanceof MandolinSpec)) return false;
		MandolinSpec spec = (MandolinSpec) otherSpec;
		if ( style.equals(spec.getStyle())) return false;
		return true;
	}
	
}
